﻿@page "/"
@page "/index"
@inject IBiliVideoService BiliVideoService

<PageTitle>哔哩哔哩各区数据对比</PageTitle>

<div style="text-align:center;margin:128px 0 128px 0">
	<Title Level="1">BiliBili分区数据实时分析</Title>
	<Text Style="color:aliceblue">可能不是很实时 也没怎么分析...</Text>
    <Text Style="display:block">——当前数据量:@videoCount 下次更新:@($"{((DateTime.Now.Hour + 1 > 24) ? 0:(DateTime.Now.Hour+1))}:00")——</Text>
</div>
<Divider>
	网站内容:
</Divider>

<Row Gutter="16">
    <Col Span="8">
    <Card Bordered="false" Title="整体对比" Hoverable="true">
        <Extra>
            <a href="">看一看</a>
        </Extra>
        <Body>
            <p>看看哪个分区的点赞投币比例最高</p>
        </Body>
    </Card>
    </Col>
    <Col Span="8">
    <Card Bordered="false" Title="分区对比" Hoverable="true">
        <Extra>
            <a href="">看一看</a>
        </Extra>
        <Body>
            <p>查看特定分区内，子分区情况的比较</p>
        </Body>
    </Card>
    </Col>
    <Col Span="8">
    <Card Bordered="false" Title="其它来源" Hoverable="true">
        <Extra>
            <a href="">看一看</a>
        </Extra>
        <Body>
            <p>看一看其它网站的情况...</p>
        </Body>
    </Card>
    </Col>
</Row>


@code {
    private int videoCount = 0;
    protected override async Task OnInitializedAsync()
    {
        videoCount = await BiliVideoService.GetVideoCount();
        await BiliVideoService.GetBiliVideos(1000);       
    }
}